/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:张熳
 * Date:2025-09-23
 * Time:15:49
 */
public class Test {
    public static void main3(String[] args) {
        Integer a = 127;
        Integer b = 127;
        System.out.println(a==b);//true
        Integer c = 128;
        Integer d = 128;
        System.out.println(c==d);//false
    }
    public static void main2(String[] args) {
        //拆箱
        Integer i = 12;
        int a = i.intValue(); //显示拆箱
        double d = i.doubleValue();
        System.out.println(a);
        System.out.println(d);

        int c = i; //自动拆箱
        System.out.println(c);
    }
    public static void main1(String[] args) {
        //装箱
        int a = 10;
        Integer i = Integer.valueOf(a); //显示装箱
        System.out.println(i);

        Double d = Double.valueOf(a);
        System.out.println(d);

        Integer i2 = 10; //自动装箱
        System.out.println(i2);
    }
}
